package com.amkai.mobile.client;

import com.amkai.mobile.client.common.AEMobileConstants;

import android.app.Activity;
import android.content.pm.PackageInfo;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.widget.TextView;

public class About extends Activity {
	
	/**
	 * 
	 */
	private void displayVersionName() {
	    String versionName = "";
	    PackageInfo packageInfo;
	    try {
	        packageInfo = getPackageManager().getPackageInfo(getPackageName(), 0);
	    	versionName = "v " + packageInfo.versionName;
	    } catch (NameNotFoundException e) {
	        e.printStackTrace();
	    }
	    TextView versionTextView = (TextView) findViewById(R.id.versionValueTextView);;
	    versionTextView.setText(versionName);
	}	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.aboutaemobile);
		setTitle(AEMobileConstants.APP_TITLE  +" - " + "About");
		displayVersionName();
	}

}
